package com.xyongfeng.foodManagement.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xyongfeng.foodManagement.domain.FoodInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
* @author xyongfeng
* @description 针对表【food_info】的数据库操作Mapper
* @createDate 2023-12-17 17:02:37
* @Entity generator.domain.FoodInfo
*/
@Mapper
public interface FoodInfoMapper extends BaseMapper<FoodInfo> {
    /**
     * 输出库存小于stock的食品信息
     * @param stock
     * @return
     */
    @Select({"call query_food_num_lt(#{stock,mode=IN,jdbcType=INTEGER})"})
    List<FoodInfo> takeQueryFoodNumLt(@Param("stock") Integer stock);
}




